﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace FACUI.BasicClass
{
    public class KedaDuandian
    {
        public int iDingfan = 0;
        public int iPointFromIndex = 0;
        public int iPointToIndex = 0;
        public List<bool> lst定反表 = new List<bool>();

        public KedaDuandian(int iDingfan, int iDcCnt, int iPointFromIndex, int iPointToIndex)
        {
            this.iDingfan = iDingfan;
            this.lst定反表.Clear();
            for (int i = 0; i < iDcCnt; i++)
            {
                this.lst定反表.Add((((int)Math.Pow(2.0, (double)i)) & iDingfan) != 0);
            }
            this.iPointFromIndex = iPointFromIndex;
            this.iPointToIndex = iPointToIndex;
        }
    }
    /************************************************************/
    /// <summary>
    /// 全段
    /// </summary>
    public class Duandian
    {
        public int jiaodu;
        public Point point;
        public char pointFlag;
        public Sharp s;

        public Duandian(Sharp s, Point point, char pointFlag, int jiaodu)
        {
            this.s = s;
            this.point = point;
            this.pointFlag = pointFlag;
            this.jiaodu = jiaodu;
        }

        public bool isDC()
        {
            return "sbDC".Equals(this.s.sharpType);
        }

        public override string ToString()
        {
            return string.Concat(new object[] { this.point, ',', this.pointFlag, ',', this.jiaodu, ',', this.s });
        }

        public DC dc
        {
            get
            {
                return (DC)this.s;
            }
            set
            {
                this.s = value;
            }
        }

        public WCQD wcqd
        {
            get
            {
                return (WCQD)this.s;
            }
            set
            {
                this.s = value;
            }
        }
    }
}

